package com.xii.eduservice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xii.eduservice.entity.EduCourse;
import com.xii.eduservice.entity.frontvo.CourseQueryVo;
import com.xii.eduservice.entity.frontvo.CourseWebVo;
import com.xii.eduservice.entity.vo.CourseInfoForm;
import com.xii.eduservice.entity.vo.CoursePublishVo;

import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author xhjava
 * @since 2022-02-13
 */
public interface EduCourseService extends IService<EduCourse> {

    //添加课程
    String saveCourseInfo(CourseInfoForm courseInfoForm);

    //根据ID查询课程
    CourseInfoForm getCourseInfoFormById(String id);

    //更新课程
    void updateCourseInfoById(CourseInfoForm courseInfoForm);

    CoursePublishVo getPublishCourseInfoFormById(String courseId);

    //删除课程
    void removeCourse(String courseId);

    //查询课程列表 返回到CourseQueryVo
    Map<String, Object> pageListWeb(Page<EduCourse> pageParam, CourseQueryVo courseQuery);

    //用户端  课程信息 封装vo类
    CourseWebVo selectInfoWebById(String courseId);
}
